package com.uzhie.exception;

import com.uzhie.web.bean.ErrorBean;

/**
 * Created by lilongfei on 2018/7/24.
 */
public class MonitorException extends BussException {
    private int status = -1;
    private String message;

    public MonitorException(String error) {
        this(0, error);
    }

    public MonitorException(int status, String error) {
        super(error);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public ErrorBean getError(){
        ErrorBean error = new ErrorBean();
        error.setCode(status);
        error.setMsg(getMessage());
        return error;
    }

    public class Status {
        public final static String PORT_ERROR = "配置文件端口异常";
        public final static String IP_ERROR = "配置文件IP属性错误";
        public final static String STREAM_ERROR = "码流配置错误";
        public final static String TYPE_ERROR = "操作类型错误";
        public final static String TEL_ERROR = "内置sim卡号不能为空";
        public final static String ORDER_ERROR = "关闭类型错误";
        public final static String RES_ERROR = "资源类型错误";
        public final static String EQUIPMENT_ERROR = "存储类型错误";
        public final static String CONTROL_ERROR = "控制指令类型错误";
        public final static String NODE_ERROR = "该用户没有设置数据查询权限";
        public final static String NOT_ONLINE = "车辆不在线";
        public final static String DATE_ERROR = "日期格式错误";
        public final static String BACK_TYPE_ERROR = "回放类型错误";
        public final static String MULTIPLES_ERROR = "退格倍数错误";
        public final static String UP_CONDITION_ERROR = "上传参数设置错误";
        public final static String UP_NUMBER_ERROR = "上传流水号错误";
        public final static String USER_ERROR = "该用户不存在数据库内";
        public final static String MEDIA_ERROR = "流媒体服务器异常,请联系管理员";

        }
}
